import request from '@/utils/request'

/**
 * UI: queryStartFormData
 * @param {*} modelId
 */
export function queryStartFormProperties(params) {
  return request({
    url: '/activiti/tmpt/queryStartFormProperties',
    method: 'get',
    params
  })
}

export function queryTaskFormProperties(taskId) {
  return request({
    url: '/activiti/tmpt/queryTaskFormProperties?taskId='+taskId,
    method: 'get'
  })
}

/**
 * 发起流程
 */
export function startProc(data) {
  return request({
    url: '/activiti/tmpt/startProcByProcDefKey',
    method: 'post',
    data
  })
}


/**
 * 我的任务列表
 */
export function listMyWaitingTask() {
  return request({
    url: '/activiti/tmpt/listMyWaitingTask',
    method: 'get'
  })
}

/**
 * 我发起的流程
 */
export function listMyStartProcInst() {
  return request({
    url: '/activiti/tmpt/listMyStartProcInst',
    method: 'get'
  })
}
/**
 * 我完成的任务
 */
export function listMyCompleteTask() {
  return request({
    url: '/activiti/tmpt/listMyCompleteTask',
    method: 'get'
  })
}


/**
 * 流程图
 */
export function getFlowImgByProcInstId(procInstId) {
  return request({
    url: '/activiti/tmpt/getFlowImgByProcInstId?procInstId='+procInstId,
    method: 'get'
  })
}


/**
 * 完成任务
 */
export function completeTask(data) {
  return request({
    //url: '/activiti/tmpt/completeByTaskId',
    url: '/city/citytask/completeByTaskId',
    method: 'post',
    data
  })
}

